package net.chasing.retrofit.callback;

import net.chasing.retrofit.bean.base.ResponseResult;

public abstract class AbstractResponseCallback<T> implements Callback<T> {
    //请求前的操作
    @Override
    public void onPreReq() {
    }

    @Override
    public void onFailure(ResponseResult<T> responseResult) {
        onFailure(responseResult.getCode(), responseResult.getMsg());
    }

    //请求成功或失败的操作之后调用
    @Override
    public void onPostReq() {
    }

    //请求取消后的操作
    @Override
    public void onCancel() {
    }
}
